<?php

namespace App\Models;

use App\Models\Contract\SerializeDatetime;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Safety extends Model
{
    use HasFactory, SerializeDatetime;

    protected $fillable = [
        'user_id', 'action', 'log_path', 'trigger_count',
        'first_trigger_at', 'last_trigger_at', 'user_ip'
    ];

    public function user()
    {
        return $this->belongsTo(User::class);
    }
}
